package com.sgcc.operate.domain;

import java.util.Date;
import java.util.List;
import java.util.Map;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.google.common.collect.Lists;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.sgcc.common.core.annotation.Excel;
import com.sgcc.common.core.web.domain.BaseEntity;

/**
 * 规则属性字段对象 o_attr_field
 * 
 * @author sgcc
 * @date 2021-03-23
 */
public class OAttrField extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    @Excel(name = "主键")
    private String id;

    /** 人群规则属性id */
    @Excel(name = "人群规则属性id")
    private String ruleattrid;

    /** 字段名称 */
    @Excel(name = "字段名称")
    private String fieldname;

    /** 字段英文名称 */
    @Excel(name = "字段英文名称")
    private String fieldengname;

    /** 数据类型 */
    @Excel(name = "数据类型")
    private String datatype;

    /** 计量单位 */
    @Excel(name = "计量单位")
    private String meteunit;

    /** 数据字典代码 */
    @Excel(name = "数据字典代码")
    private String datafieldcode;

    /** 数据字典名称 */
    @Excel(name = "数据字典名称")
    private String datafieldname;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date createDate;

    /** 更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date updateDate;

    /** 逻辑删除标记（0：显示；1：隐藏） */
    @Excel(name = "逻辑删除标记", readConverterExp = "0=：显示；1：隐藏")
    private String delFlag;

    public void setId(String id) 
    {
        this.id = id;
    }

    private List<Map<String, String>> codeList = Lists.newArrayList(); //数据字典集合

    public String getId()
    {
        return id;
    }
    public void setRuleattrid(String ruleattrid) 
    {
        this.ruleattrid = ruleattrid;
    }

    public String getRuleattrid() 
    {
        return ruleattrid;
    }
    public void setFieldname(String fieldname) 
    {
        this.fieldname = fieldname;
    }

    public String getFieldname() 
    {
        return fieldname;
    }
    public void setFieldengname(String fieldengname) 
    {
        this.fieldengname = fieldengname;
    }

    public String getFieldengname() 
    {
        return fieldengname;
    }
    public void setDatatype(String datatype) 
    {
        this.datatype = datatype;
    }

    public String getDatatype() 
    {
        return datatype;
    }
    public void setMeteunit(String meteunit) 
    {
        this.meteunit = meteunit;
    }

    public String getMeteunit() 
    {
        return meteunit;
    }
    public void setDatafieldcode(String datafieldcode) 
    {
        this.datafieldcode = datafieldcode;
    }

    public String getDatafieldcode() 
    {
        return datafieldcode;
    }
    public void setDatafieldname(String datafieldname) 
    {
        this.datafieldname = datafieldname;
    }

    public String getDatafieldname() 
    {
        return datafieldname;
    }
    public void setCreateDate(Date createDate) 
    {
        this.createDate = createDate;
    }

    public Date getCreateDate() 
    {
        return createDate;
    }
    public void setUpdateDate(Date updateDate) 
    {
        this.updateDate = updateDate;
    }

    public Date getUpdateDate() 
    {
        return updateDate;
    }
    public void setDelFlag(String delFlag) 
    {
        this.delFlag = delFlag;
    }

    public String getDelFlag() 
    {
        return delFlag;
    }

    public List<Map<String, String>> getCodeList() {
        return codeList;
    }

    public void setCodeList(List<Map<String, String>> codeList) {
        this.codeList = codeList;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("ruleattrid", getRuleattrid())
            .append("fieldname", getFieldname())
            .append("fieldengname", getFieldengname())
            .append("datatype", getDatatype())
            .append("meteunit", getMeteunit())
            .append("datafieldcode", getDatafieldcode())
            .append("datafieldname", getDatafieldname())
            .append("createBy", getCreateBy())
            .append("createDate", getCreateDate())
            .append("updateBy", getUpdateBy())
            .append("updateDate", getUpdateDate())
            .append("remark", getRemark())
            .append("delFlag", getDelFlag())
            .toString();
    }
}
